package com.sanjishu.enterlab.electricity.sale.controller.manage;

import com.sanjishu.enterlab.electricity.sale.domain.CompanyInfo;
import com.sanjishu.enterlab.electricity.sale.domain.ContractInfo;
import com.sanjishu.enterlab.electricity.sale.service.CompanyManageService;
import com.sanjishu.enterlab.electricity.sale.service.ContractInfoService;
import com.sanjishu.enterlab.electricity.sale.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("manage/companyInfo")
public class SettlementsManageController {
    @Autowired
    private ContractInfoService contractInfoService;

    @RequestMapping(value = "userSettlement", method = RequestMethod.GET)
    public String contracts(Integer page, Model model) {
        Page<ContractInfo> contractInfoPage = contractInfoService.contractList(1);
        model.addAttribute("pageData", contractInfoPage);
        return "manage/settlements/user_settlements";
    }
}
